package com.nihao001.parse.reader;

import java.util.Map;

import org.jsoup.Connection.Response;

import com.nihao001.parse.exception.ParseException;

/**
 * 
 * <p>
 * Description:please enter information.....
 * </p>
 * 
 * <p>
 * Author: wang xing yue
 * </p>
 * <p>
 * Date :Nov 14, 2013
 * </p>
 * 
 */

public interface Reader {

	/**
	 * http get请求
	 * 
	 * @param url
	 * @param data
	 * @return
	 * @throws ParseException
	 */
	public Response get(String url, Map<String, String> data,
			Map<String, String> cookie) throws ParseException;
	
	
	public Response get(String url, Map<String, String> data,
        Map<String, String> cookie, Map<String, String> headers) throws ParseException;
	
	public Response get(String url, String requestEncode, Map<String, String> data,
        Map<String, String> cookie, Map<String, String> headers) throws ParseException;

	/**
	 * http post请求
	 * 
	 * @param url
	 * @param data
	 * @return
	 */
	public Response post(String url, Map<String, String> data,
			Map<String, String> cookie) throws ParseException;
	
	
	public Response post(String url, Map<String, String> data,
        Map<String, String> cookie, Map<String, String> headers) throws ParseException;
	
	
	public Response post(String url, String requestEncode, Map<String, String> data,
        Map<String, String> cookie, Map<String, String> headers) throws ParseException;

	/**
	 * 设置代理服务器
	 * 
	 * @param proxyHost
	 *            代理服务器的ip
	 * @param proxyPort
	 *            代理服务器的端口
	 * @throws ParseException
	 */
	public void setProxy(String proxyHost, int proxyPort) throws ParseException;

	/**
	 * 重置代理服务器的设置
	 * 
	 */
	public void resetProxy();

}
